<%
		Const Const_Drive = "MySql ODBC 5.1 Driver"
		Const Const_Servidor = "127.0.0.1"
		Const Const_Login = "root"
		Const Const_Senha = "091190"

sub AbreConexao		
		
		set conexao_geral= Server.CreateObject("ADODB.Connection")
		conexao_geral.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Geral
		conexao_geral.open 
		
		set conexao_individuais = Server.CreateObject("ADODB.Connection")
		conexao_individuais.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Individuais
		conexao_individuais.open 
		
		set conexao_clubes = Server.CreateObject("ADODB.Connection")
		conexao_clubes.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Clubes
		conexao_clubes.open 
		
		set conexao_selecoes = Server.CreateObject("ADODB.Connection")
		conexao_selecoes.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Selecoes
		conexao_selecoes.open 
		
		set conexao_mensagens = Server.CreateObject("ADODB.Connection")
		conexao_mensagens.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Mensagens
		conexao_mensagens.open 
		
		set conexao_registros = Server.CreateObject("ADODB.Connection")
		conexao_registros.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Registros
		conexao_registros.open 		
		
		set conexao_aux= Server.CreateObject("ADODB.Connection")
		conexao_aux.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database="&Banco_Geral
		conexao_aux.open 
		
end sub

sub FechaConexao
		conexao_geral.close
		conexao_individuais.close
		conexao_clubes.close
		conexao_selecoes.close
		conexao_mensagens.close
		conexao_registros.close
		conexao_aux.close
		set conexao = nothing
		set conexao_individuais = nothing
		set conexao_clubes = nothing
		set conexao_selecoes = nothing
		set conexao_mensagens = nothing
		set conexao_registros = nothing
		set conexao_aux = nothing
end sub

Function AbreConexaoAux(Banco)
		
		set conexao_aux= Server.CreateObject("ADODB.Connection")
		conexao_aux.ConnectionString = "driver="&Const_Drive&";server="&Const_Servidor&"; uid="&Const_Login&"; pwd="&Const_Senha&"; database=newbarbolao_"&Banco
		conexao_aux.open 
		
end function

%>